
local _G = _G
local Button = require "Button"

local buttonMachine = Button.ProtoMachine:clone()

buttonMachine:process(Button.ToggleEvent) -- no transition
buttonMachine:process(Button.DisableEvent) -- no transition
buttonMachine:process(Button.EnableEvent) -- transit to EnabledState
buttonMachine:process(Button.ToggleEvent) -- transit to ToggledState
buttonMachine:process(Button.DisableEvent) -- transit to ToggledDisableState
buttonMachine:process(Button.EnableEvent) -- transit to ToggledState
buttonMachine:process(Button.ToggleEvent) -- transit to EnabledState
